<?php

namespace App\Http\Controllers\mangercontroller;

use App\Http\Controllers\Controller;
use Illuminate\Http\Request;
use App\Services\FileServiceInterFace;
use App\Services\RepotsServiceInterFace;

use Log;

class FileMangerController extends Controller{

    private $fileService;

    public function __construct(FileServiceInterFace $fileServiceInterface)
    {
        $this->fileService = $fileServiceInterface;
    }

    public function imageMager(Request $request){
        $credentials = $request->validate([
            'currentPage' => 'required|integer',
            'pageSize' => 'required|integer',
        ]);
        return $this->fileService->getImageList($credentials);
    }

    public function deleteImageMager(Request $request){
        $credentials = $request->validate([
            'ids' => 'required',
        ]);
        return $this->fileService->deleteImageMager($credentials);
    }
}
